<!doctype html>
<html>
	<head id="top">
		<meta charset="UTF-8">
		<title>{{title}}</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="css/common.css" />
		<link rel="stylesheet" href="css/testDetail.css" />
	</head>
	
	<body>
		<div id="test">
			<div class="mui-content gridBox">
			    <div class="mui-row">
			        <div class="mui-col-xs-4 gridColLeft">项目名称:</div>
			        <div class="mui-col-xs-8 gridColRight">{{msg.productName}}</div>
			    </div>
			    <div class="mui-row">
			        <div class="mui-col-xs-4 gridColLeft">物价编码:</div>
			        <div class="mui-col-xs-8 gridColRight">{{msg.priceCode}}</div>
			    </div>
			    <div class="mui-row">
			        <div class="mui-col-xs-4 gridColLeft">样品保存条件:</div>
			        <div class="mui-col-xs-8 gridColRight">{{msg.specimenSaveDiction}}</div>
			    </div>
			    <div class="mui-row">
			        <div class="mui-col-xs-4 gridColLeft">样本要求:</div>
			        <div class="mui-col-xs-8 gridColRight">{{msg.specimenRequest}}</div>
			    </div>
			    <div class="mui-row">
			        <div class="mui-col-xs-4 gridColLeft">检测方法:</div>
			        <div class="mui-col-xs-8 gridColRight">{{msg.experimentalMethod
}}</div>
			    </div>
			    <div class="mui-row">
			        <div class="mui-col-xs-4 gridColLeft">参考范围:</div>
			        <div class="mui-col-xs-8 gridColRight">{{msg.referenceRanges}}</div>
			    </div>
			    <div class="mui-row">
			        <div class="mui-col-xs-4 gridColLeft">临床意义:</div>
			        <div class="mui-col-xs-8 gridColRight">{{msg.clinicalSignificance}}</div>
			    </div>
			    <div class="mui-row">
			        <div class="mui-col-xs-4 gridColLeft">报告时间:</div>
			        <div class="mui-col-xs-8 gridColRight">{{msg.reportTime}}</div>
			    </div>
			    <div class="mui-row">
			        <div class="mui-col-xs-4 gridColLeft">标准价格(元):</div>
			        <div class="mui-col-xs-8 gridColRight">{{msg.price}}</div>
			    </div>
			    <div class="mui-row">
			        <div class="mui-col-xs-4 gridColLeft">备注:</div>
			        <div class="mui-col-xs-8 gridColRight">{{msg.remark}}</div>
			    </div>  
			</div>
		</div>
		<!--二维码-->
		<footer>
			<div class="qrCode">
				<img src="img/qrcode.jpg" alt="" />
				<p>关注医诺云检微信</p>
				<p>了解更多检验项目</p>
			</div>
		</footer>
		<script src="js/mui.min.js"></script>
		<script src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
		<script src="js/vue.js"></script>
		<script src="js/cmms.js"></script>
		<script>
			var top=new Vue({
				el:'#top',
				data:{
					title:''
				},
				mounted(){
					let url=location.href.split("?")[1];
					this.get(url);
				},
				methods:{
					get:function(url){
						let _this=this;
						if(url){
							let code=url.split("&")[1].split("=")[1];
							let t = decodeURI(decodeURI(code)); 
							_this.title=t;
					}
				}
				}
			});
			var test=new Vue({
				el:'#test',
				data:{
//					url:'https://lab.ulabcare.com/clinicalmall-web/',
					msg:{},
					id:''
				},
				mounted(){
					let url = location.href.split('?')[1];
					this.init();
					this.getCode(url);
					this.loadPage(this.url);
				},
				methods:{
					init:function(){
		    			let _this = this;
		    			YN.muiAjax('common/getWxConfig','post',{
		    				url:location.href.split('#')[0],
		    				appId:'wx50a81908477971c2',
							secret: "ca13e35925e5b93fe740f2814d3d5423"
		    			},
		    			function(res){
								wx.config({
									appId:res.appId,
									timestamp:res.timesTamp,
									nonceStr:res.nonceStr,
									signature:res.signature,
									jsApiList:['onMenuShareTimeline','onMenuShareAppMessage']
								});
								wx.ready(function(){
									wx.onMenuShareAppMessage({
										title:decodeURI(decodeURI(location.href.split("?")[1].split("&")[1].split("=")[1])), // 分享标题
										link: location.href, // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
										desc:_this.msg.clinicalSignificance,
										imgUrl: 'https://test.lis.ulabcare.com/inspectionCatalogue/img/logo2.png', // 分享图标
										success: function () {
										    // 用户点击了分享后执行的回调函数
										}
									})	
								})
							
						})	
		    		},
					//获取参数id
					getCode:function(url){
						let _this = this;
						if(url){
							let code = url.split('&')[0].split('=')[1];
							_this.id=code;
						}
					},
					//加载后台数据
					loadPage:function(url){
						let _this=this;
						mui.ajax(YN.baseUrl+'jyzsApp/selectIntroductionByIds',{
							data:{
								id:this.id
							},
							headers:{'Content-Type': 'application/json'}, 
							dataType:'json',//服务器返回json格式数据
							type:'post',//HTTP请求类型
							success:function(res){
								//服务器返回响应，根据响应结果，分析；
								 console.log(res);
								if(res.code=="0"){
									_this.msg=res.data;
									
								}
							},
							error:function(xhr,type,errorThrown){
								//异常处理；
								console.log(type);
							}
						});
					}
				}
			})
		</script>
	</body>

</html>